/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package diet.dto;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

public class UserDTO implements java.io.Serializable {

    private int UserID;
    private String Name;
    private String Password;
    private String email;
    private int Male;
    private Date Birthday;
    private int Phone;
    private int Height;
    private int Weight;
    private String Role;

    public UserDTO() {
        this.UserID = 1;
        this.Name = "abc";
        this.Password = "";
        this.email = "";
        this.Male = 1;
        this.Phone = 123456789;
        this.Height = 173;
        this.Weight = 60;
        this.Role = "Customer";
        //get current date and assign to createdDate and lastModifiedDate
        int year = Calendar.getInstance().get(Calendar.YEAR);
        int month = Calendar.getInstance().get(Calendar.MONTH);
        int date = Calendar.getInstance().get(Calendar.DATE);
        String dateString = Integer.toString(year) + "-" + Integer.toString(month) + "-" + Integer.toString(date);
        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
        try {
        	this.Birthday = dateFormat.parse(dateString);

        }
        catch (ParseException ex) {

        	this.Birthday = null;
        }
    }

    public UserDTO(int UserID, String Name, String Password, String email, int Male, Date Birthday, int Phone, int Height, int Weight, String Role) {
        this.UserID = UserID;
        this.Name = Name;
        this.Password = Password;
        this.email = email;
        this.Male = Male;
        this.Birthday = Birthday;
        this.Phone = Phone;
        this.Height = Height;
        this.Weight = Weight;
        this.Role = Role;
    }
    

    /**
     * @return the UserID
     */
    public int getUserID() {
        return UserID;
    }

    /**
     * @param UserID the UserID to set
     */
    public void setUserID(int UserID) {
        this.UserID = UserID;
    }

    /**
     * @return the Name
     */
    public String getName() {
        return Name;
    }

    /**
     * @param Name the Name to set
     */
    public void setName(String Name) {
        this.Name = Name;
    }

    /**
     * @return the Password
     */
    public String getPassword() {
        return Password;
    }

    /**
     * @param Password the Password to set
     */
    public void setPassword(String Password) {
        this.Password = Password;
    }

    /**
     * @return the email
     */
    public String getEmail() {
        return email;
    }

    /**
     * @param email the email to set
     */
    public void setEmail(String email) {
        this.email = email;
    }

    /**
     * @return the Male
     */
    public int getMale() {
        return Male;
    }

    /**
     * @param Male the Male to set
     */
    public void setMale(int Male) {
        this.Male = Male;
    }

    /**
     * @return the Birthday
     */
    public Date getBirthday() {
        return Birthday;
    }

    /**
     * @param Birthday the Birthday to set
     */
    public void setBirthday(Date Birthday) {
        this.Birthday = Birthday;
    }

    /**
     * @return the Phone
     */
    public int getPhone() {
        return Phone;
    }

    /**
     * @param Phone the Phone to set
     */
    public void setPhone(int Phone) {
        this.Phone = Phone;
    }

    /**
     * @return the Height
     */
    public int getHeight() {
        return Height;
    }

    /**
     * @param Height the Height to set
     */
    public void setHeight(int Height) {
        this.Height = Height;
    }

    /**
     * @return the Weight
     */
    public int getWeight() {
        return Weight;
    }

    /**
     * @param Weight the Weight to set
     */
    public void setWeight(int Weight) {
        this.Weight = Weight;
    }

    /**
     * @return the Role
     */
    public String getRole() {
        return Role;
    }

    /**
     * @param Role the Role to set
     */
    public void setRole(String Role) {
        this.Role = Role;
    }

    
}
